package example.chapter12.div;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import example.chapter12.model.Person;

public class DivTestAction extends ActionSupport{
	private List<Person> listPerson;
	
	public String execute() throws Exception{
		SimpleDateFormat dateForm = new SimpleDateFormat("yyyy-MM-dd");
		
		listPerson = new ArrayList<Person>();
		listPerson.add(new Person("Hhjbest", 29, dateForm.parse("1979-06-15")));
		listPerson.add(new Person("Nockarm", 41, dateForm.parse("1967-08-09")));
		
		return SUCCESS;
	}

	public List<Person> getListPerson() {
		return listPerson;
	}

	public void setListPerson(List<Person> listPerson) {
		this.listPerson = listPerson;
	}
	
}
